package com.hhs.storage.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author shadow
 * @since 2018-12-18
 */
@TableName("jxc_product")
@Data
public class JxcProduct  extends Model<JxcProduct> {

    private static final long serialVersionUID = 1L;

    @TableId("id_")
    private String id;
    @TableField("type_id_")
    private String typeId;
    @TableField("total_")
    private Integer total;
    @TableField("price_")
    private Integer price;
    @TableField("create_time_")
    @JSONField(format="yyyy-MM-dd hh:mm:ss")
    private Date createTime;

    @TableField(exist = false)
    private String typeName;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
